import { Runtime } from 'wxt/browser';

export default defineContentScript({
  matches: ['https://www.dianxiaomi.com/web/popTemu/pageList/offline*'],

  async main(ctx) {
    const ui = createIframeUi(ctx, {
      page: '/dianxiaomi-meituxiuxiu-html.html',
      position: 'inline',
      onMount: (wrapper, iframe) => {
        iframe.style.display = 'none';
        iframe.id = 'dianxiaomi-meituxiuxiu-iframe';
      },
    });

    // Show UI to user
    ui.mount();
  },
});
